﻿@using Model.Database
@{
    Layout = null;
    UserInfo userInfo = null;
    string roleNameStr = null;
    string departmentNameStr = null;

    if (ViewData["LoginUser"] != null)
    {
        userInfo = ViewData["LoginUser"] as UserInfo;
    }
    else
    {
        Response.Redirect("/Login/Index");
    }
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <title>小鱼</title>
    <link href="~/Content/Scripts/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="~/Content/Scripts/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" />
    <link href="~/Content/Scripts/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" />
    <link href="~/Content/Scripts/h-ui.admin/skin/default/skin.css" rel="stylesheet" id="skin" />
    <link href="~/Content/Scripts/ZTree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
    <link href="~/Content/Scripts/ZTree/css/HuiCustomMenu/StyleReset.css" rel="stylesheet" />

    <style>
        #headPhoto {
            width: 44px;
            height: 44px;
        }

            #headPhoto img {
                margin: 0;
                padding: 0;
                width: 100%;
                height: 92%;
            }
    </style>

    <!--引入脚本解决兼容性(hack技术，必须放入head中)-->
    <!--[if lt IE 9]>
        <script src="~/Content/Scripts/html5_css3/html5shiv.min.js"></script>
        <script src="~/Content/Scripts/html5_css3/respond.min.js"></script>
        <script src="~/Content/Scripts/PIE-2.0beta1/PIE_IE678.js"></script>
    <![endif]-->
</head>
<body>
    @*顶部导航栏*@
    <header class="navbar-wrapper">
        <div class="navbar navbar-fixed-top">
            <div class="container-fluid cl">
                <span class="logo navbar-logo">小鱼平台管理</span>
                <nav class="nav navbar-nav">
                    <ul class="cl">
                        <li><a id="welcome" href="javascript:;">首页</a></li>
                    </ul>
                </nav>
                <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                    <ul class="cl">
                        <li>
                            @{
                                List<Role> roleList = userInfo.Roles.ToList();
                                List<Department> departmentList = userInfo.Departments.ToList();
                                for (int i = 0; i < roleList.Count; i++)
                                {
                                    if (i != roleList.Count - 1)
                                    {
                                        roleNameStr += roleList[i].RoleName + "_兼_";
                                    }
                                    else
                                    {
                                        roleNameStr += roleList[i].RoleName;
                                    }
                                }
                                for (int i = 0; i < departmentList.Count; i++)
                                {
                                    if (i != departmentList.Count - 1)
                                    {
                                        departmentNameStr += departmentList[i].DepartmentName + "_兼_";
                                    }
                                    else
                                    {
                                        departmentNameStr += departmentList[i].DepartmentName;
                                    }
                                }
                                <span>部门： @departmentNameStr</span>@:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <span>角色： @roleNameStr</span>

                            }
                        </li>
                        <li class="dropDown dropDown_hover">
                            <a href="#" class="dropDown_A">@userInfo.Nickname<i class="Hui-iconfont">&#xe6d5;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="/UserInfo/Home/Center" target="_blank">用户中心</a></li>
                                <li><a href="/Logout/Index">退出</a></li>
                            </ul>
                        </li>
                        <li>
                            <div id="headPhoto">
                                @{
                                    if (string.IsNullOrEmpty(userInfo.Headphoto))
                                    {
                                        <img src="/defaultHeadPhoto.jpg" class="round">
                                    }
                                    else
                                    {
                                        <img src="@userInfo.Headphoto" class="round">
                                    }
                                }
                            </div>
                        </li>
                        <li id="Hui-skin" class="dropDown right dropDown_hover">
                            <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                                <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                                <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                                <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                                <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                                <li><a href="javascript:;" data-val="orange" title="绿色">橙色</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </header>

    @*左侧菜单栏*@
    <aside class="Hui-aside">
        <input runat="server" id="divScrollValue" type="hidden" value="" />
        <div class="menu_dropdown bk_2">
            <ul style="display: none;">
                <li><a data-href="/UserInfo/Home/Welcome" data-title="首页" href="javascript:void(0)">首页</a></li>
            </ul>

            <div style="width: 100%; background: #EFEFEF;">
                <ul id="treeMenu" class="ztree showIcon"></ul>
            </div>

        </div>
    </aside>

    @*右侧主体*@
    <div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onclick="displaynavbar(this)"></a></div>
    <section class="Hui-article-box">
        <div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
            <div class="Hui-tabNav-wp">
                <ul id="min_title_list" class="acrossTab cl">
                    <li class="active"><span data-href="/UserInfo/Home/Welcome" title="首页">首页</span><i></i><em></em></li>
                </ul>
            </div>
            <div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
        </div>
        <div id="iframe_box" class="Hui-article">
            <div class="show_iframe">
                <div style="display:none" class="loading"></div>
                <iframe scrolling="yes" frameborder="0" src="/UserInfo/Home/Welcome"></iframe>
            </div>
        </div>
    </section>

    @*右击帮助栏*@
    <div class="contextMenu" id="myMenu1">
        <ul>
            <li id="refresh">刷新 </li>
            <li id="closeCurrent">关闭当前 </li>
            <li id="closeOther">关闭其他 </li>
            <li id="closeAll">关闭所有 </li>
        </ul>
    </div>

</body>
</html>
<script src="~/Content/Scripts/jquery-2.0.3.min.js"></script>
<script src="~/Content/Scripts/layer/2.1/layer.js"></script>
<script src="~/Content/Scripts/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script src="~/Content/Scripts/h-ui/js/H-ui.js"></script>
<script src="~/Content/Scripts/h-ui.admin/js/H-ui.admin.js"></script>
<script src="~/Content/Scripts/ZTree/js/jquery.ztree.core.min.js"></script>

<script src="~/Content/Scripts/TxyJs.js"></script>
<script src="~/Content/Scripts/System/Area/UserInfo/Home/Index/Index.js"></script>